﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/Manager.Master" AutoEventWireup="true"
    CodeBehind="Index.aspx.cs" Inherits="Enterprise.UI.Web.Manage.Module.Index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript" src="../Common/js/global.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <Ent:HeadMenuWebControls ID="HeadMenuWebControls1" runat="server" HeadTitleTxt="模块配置">
    </Ent:HeadMenuWebControls>
    <asp:GridView ID="GridView1" runat="server" DataKeyNames="MODULEID" AutoGenerateColumns="false"
        OnRowDataBound="GridView1_OnRowDataBound" OnRowCommand="GridView1_OnRowCommand">
        <Columns>
            <asp:BoundField DataField="mCode" HeaderText="编码" ItemStyle-Width="50" />
            <asp:HyperLinkField DataTextField="mName" HeaderText="名称" DataNavigateUrlFields="MODULEID"
                DataNavigateUrlFormatString="Index.aspx?Id={0}" ItemStyle-HorizontalAlign="Left"
                ItemStyle-Width="120" />
            <asp:BoundField DataField="mUrl" HeaderText="链接地址" ItemStyle-HorizontalAlign="Left" />
            <asp:TemplateField HeaderText="是否系统外链接" ItemStyle-Width="70">
                <ItemTemplate>
                    <%#((int)Eval("MSINGLE")) == 0 ? "否" : "是"%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="mTarget" HeaderText="链接目标" ItemStyle-Width="70" />
            <asp:TemplateField HeaderText="是否启用" ItemStyle-Width="70">
                <ItemTemplate>
                    <%#((string)Eval("mDelete")) == "0" ? "<img src=\"../Common/img/right.gif\" border=\"0\">" : "<img src=\"../Common/img/wrong.gif\" border=\"0\">"%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="排序" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="60">
                <ItemTemplate>
                   <a href="Index.aspx?Id=<%=Id %>&mId=<%#Eval("MODULEID") %>&Action=Up"><img src="../Common/img/up.gif" title="上移" alt="" border="0" /></a>&nbsp;&nbsp;<a href="Index.aspx?Id=<%=Id %>&mId=<%#Eval("MODULEID") %>&Action=Down"><img src="../Common/img/down.gif"
                        title="下移" alt="" border="0" /></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ItemStyle-Width="110">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" CommandName="mClose" CommandArgument='<%#Container.DataItemIndex %>'
                        OnClientClick="return confirm('确定关闭该功能模块？')" runat="server">关闭</asp:LinkButton>
                    <asp:LinkButton ID="LinkButton2" CommandName="mOpen" CommandArgument='<%#Container.DataItemIndex %>'
                        OnClientClick="return confirm('确定打开改功能模块 ?')" runat="server">打开</asp:LinkButton>
                    <a href="Edit.aspx?Id=<%#Eval("MODULEID") %>">修改</a>
                    <asp:LinkButton ID="LinkButton3" CommandName="mDelete" CommandArgument='<%#Container.DataItemIndex  %>'
                        OnClientClick="return confirm('确定要删除该功能模块？删除将无法恢复')" runat="server">删除</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</asp:Content>
